package jman.competition08;

public class Q4_Student {
	private String schoolId;
	private String name;
	private byte mark=0;
	public Q4_Student(String schoolId,String name,byte mark){
		this.setSchoolId(schoolId);
		this.setName(name);
		this.setMark(mark);
	}
	public Q4_Student(String schoolId,String name){
		this.setSchoolId(schoolId);
		this.setName(name);
	}
	public String getSchoolId() {
		return schoolId;
	}
	public void setSchoolId(String schoolId) {
		this.schoolId = schoolId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public byte getMark() {
		return mark;
	}
	public void setMark(byte mark) {
		this.mark = mark;
	}
	public boolean isPay(){
		if(this.mark!=0){
			return true;
		}else{
			return false;
		}
	}
	public byte result(){
		if(this.mark>=80){
			return 2;
		}else if(this.mark>=60&&this.mark<80){
			return 1;
		}else{
			return 0;
		}
	}
}
